import request from './require.js'
// test commit
// 登录接口 user/login
export const login = (params) => request.post("/user/login", params);

// 修改密码 api/changePassword
export const changePassword = (params) => request.post("/api/changePassword", params);

// 上币申请记录 /api/getApplyTokenList
export const getApplyTokenList = (params) => request.get("/api/getApplyTokenList", {params});


// 获取配置信息   /api/getConfigList
export const getConfigList = (params) => request.get("/api/getConfigList", {params});

// 获取套餐列表
export const getProductList = (params) => request.get("/api/getProductList", {params})
// 添加套餐
export const createProduct = (data) => request.post("/api/createProduct", data)
// 修改套餐
export const patchProduct = (data) => request.patch("/api/updateProduct", data)
// 删除套餐
export const deleteProduct = (data) => request.post("/api/delete", data)

// 用户列表 /api/getUserList
export const getUserList = (params) => request.get("/api/getUserList", {params});

// 修改用户状态 /api/changeStatus
export const changeStatus = (data) => request.post("/api/changeStatus", data)

// 新增用户 /api/createUser
export const createUser = (data) => request.post("/api/createUser", data)

// 更新用户 /api/updateUser
export const updateUser = (data) => request.post("/api/updateUser", data)

// 获取邮箱验证码
export const getEmailCodeApi = (params) => request.patch("/user/config/email", params);

// 资产列表 /api/getPrivateKeyList
export const getPrivateKeyList = (params) => request.get("/api/getPrivateKeyList", {params});

// 添加资产 /api/createPrivateKey
export const createPrivateKey = (data) => request.post("/api/createPrivateKey", data)

// 更新资产 /api/updatePrivateKey
export const updatePrivateKey = (data) => request.patch("/api/updatePrivateKey", data)

// 删除资产 /api/deletePrivateKey/{id}
export const deletePrivateKey = (id, code) => request.delete(`/api/deletePrivateKey/${id}/${code}`);

// 更新手续费地址
export const updateFeeAddressApi = (data) => request.patch("/api/updateAddress", data);

// 更换证书 /api/changePrivatePem
export const changePrivatePemApi = () => request.post("/api/changePrivatePem");


// 代币列表 /api/tokenList
export const tokenList = (params) => request.get("/api/tokenList", {params});

// 新增代币 /api/createToken
export const createToken = (data) => request.post("/api/createToken", data)

// 更新代币 /api/updateToken
export const updateToken = (data) => request.post("/api/updateToken", data)

// 删除代币 /api/deleteToken
export const deleteToken = (data) => request.post("/api/deleteToken", data)

// 获取接口文档信息 /api/getInfo
export const getInfo = (params) => request.get("/api/getInfo", {params});

// 新增接口文档 /api/createWebConfig
export const createWebConfig = (data) => request.post("/api/createWebConfig", data)

// 轮播图列表 /api/getPictureList
export const getPictureList = (params) => request.get("/api/getPictureList", {params});


// 上传图片 /api/upload
export const upload = (data) => request.post("/api/upload", data)

// 新增轮播图 /api/createPicture
export const createPicture = (data) => request.post("/api/createPicture", data)

// 删除轮播图 /api/deletePicture
export const deletePicture = (data) => request.delete("/api/deletePicture", {data})

// 更新轮播图 /api/updatePicture
export const updatePicture = (data) => request.patch("/api/updatePicture", data)

// 新增类别 /api/createCategory
export const createCategory = (data) => request.post("/api/createCategory", data)

// 类别列表 /api/categoryList
export const categoryList = (params) => request.get("/api/categoryList", {params});

// 更改类别 /api/updateCategory
export const updateCategory = (data) => request.post("/api/updateCategory", data)

// 获取充币列表
export const getUpCoinListApi = (params) => request.get("/api/upCoinList", { params });

// 获取提币列表
export const getWithdrawListApi = (params) => request.get("/api/withdrawList", { params });

// 获取操作日志
export const getOperationLogListApi = () => request.get("/api/operationLogList");